﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp3
{
    class Shape
    {
        private string color;

        
        public virtual void GetArea(double sideLen)
        {
            Console.WriteLine("请输入正方形的边长");
            sideLen = double.Parse(Console.ReadLine());
            double area = sideLen * sideLen;
            Console.WriteLine("正方形的面积是" + area);
        }
        public virtual void GetArea(int radius)
        {
            Console.WriteLine("请输入圆的半径");
            radius = int.Parse(Console.ReadLine());
            double area = 3.14 * radius;
            Console.WriteLine("圆的面积是" + area);
        }
    }
}
